<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div :style='style'>{{person.name}}  {{msg}}   {{person.age}}</div>
        <div :style='style'>{{person.fav.play}}</div>
        <div v-text='msg'></div>
        <div v-html='htmlStr'></div>
        <input type="text" v-model='person.name'>
        <input type="text" v-model='person.fav.play'>
        <input type="text" v-model='msg'>
        <img :src="src" alt="">
        <button v-on:click='handleClick'>提交</button>
        <button @click='handleClick'>提交11</button>
    </div>
</body>
<script src="./Observer.js"></script>
<script src="./vue.js"></script>
<script>
    var app = document.getElementById('app');
   let vue = new Vue({
        el:'#app',
        data:{
            person:{
                name:'哈哈',
                age:18,
                fav:{
                    play:'football'
                }
            },
            msg:'测试',
            htmlStr:'<h2>我是innerHTML</h2>',
            style:'color:red',
            src:'./img/bg.png'
        },
        methods:{
            handleClick(){
                console.log(this);
            }
        },
    });
</script>
</html>